﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="index" %>
<%@ Register Src="GlobalHeader.ascx" TagName="GlobalHeader" TagPrefix="ucHeader" %>
<%@ Register Src="GlobalFooter.ascx" TagName="GlobalFooter" TagPrefix="ucFooter" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>易居臣信二手房管理系统——系统首页</title>
<link href="css/cssreset.css" rel="stylesheet" type="text/css" />
<link href="css/global.css" rel="stylesheet" type="text/css" />
<link href="css/index.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/menu.js"></script>
<script src="js/ui.tabs.pack.js" type="text/javascript"></script>
       <script type="text/javascript">
            $(function() {
                $('#container-1 > ul').tabs();
                $('#container-2 > ul').tabs();
               
            });
        </script>
<script type="text/javascript">
    $(document).ready(function() {
        $("#mynav0").addClass("menu_on");
        $("#nicemenu img.arrow").click(function() {

            $("span.head_menu").removeClass('active');

            submenu = $(this).parent().parent().find("div.sub_menu");

            if (submenu.css('display') == "block") {
                $(this).parent().removeClass("active");
                submenu.hide();
                $(this).attr('src', 'images/arrow_hover.png');
            } else {
                $(this).parent().addClass("active");
                submenu.fadeIn();
                $(this).attr('src', 'images/arrow_select.png');
            }

            $("div.sub_menu:visible").not(submenu).hide();
            $("#nicemenu img.arrow").not(this).attr('src', 'arrow.png');

        })
	.mouseover(function() { $(this).attr('src', 'images/arrow_hover.png'); })
	.mouseout(function() {
	    if ($(this).parent().parent().find("div.sub_menu").css('display') != "block") {
	        $(this).attr('src', 'images/arrow.png');
	    } else {
	        $(this).attr('src', 'images/arrow_select.png');
	    }
	});

        $("#nicemenu span.head_menu").mouseover(function() { $(this).addClass('over') })
								 .mouseout(function() { $(this).removeClass('over') });

        $("#nicemenu div.sub_menu").mouseover(function() { $(this).fadeIn(); })
							   .blur(function() {
							       $(this).hide();
							       $("span.head_menu").removeClass('active');
							   });

        $(document).click(function(event) {
            var target = $(event.target);
            if (target.parents("#nicemenu").length == 0) {
                $("#nicemenu span.head_menu").removeClass('active');
                $("#nicemenu div.sub_menu").hide();
                $("#nicemenu img.arrow").attr('src', 'images/arrow.png');
            }
        });


        $("[id=saleState]").click(function(event) {
           // var url = 'HouseManager.aspx?id=0';
            var url = 'HouseManager.aspx?n=' + encodeURIComponent($(this).nextAll('span[id=CommunityName]').text()) + '&bus=10';
          window.location.href = url;
        });

        $("[id=hireState]").click(function(event) {
           // var url = 'HouseManager.aspx?id=1';
            var url = 'HouseManager.aspx?n=' + encodeURIComponent($(this).nextAll('span[id=CommunityName]').text()) + '&bus=20';
            window.location.href = url;
        });


        //上班
        $("#btStartWork").click(function(){
            $.ajax({
                type:"POST",
                url:"service/attendanceManage.ashx?DealType=AddStartWork",
                dataType:"Json",
                success:function(strRet){
                    //回传Json数据
                    var jsonRet = eval("(" + strRet + ")");
                    //成功
                    if(jsonRet.RetFlg=="SUCCESS"){
                        $("#lbStartWork").html(jsonRet.Data);
                        $("#btStartWork").attr("disabled","disabled");
                    }else{
                        var strErrMsg = jsonRet.Data;
                        alert("错误信息：" + strErrMsg);
                    }
                }
            });
        });
        //下班
        $("#btEndWork").click(function(){
            $.ajax({
                type:"POST",
                url:"service/attendanceManage.ashx?DealType=AddEndWork",
                dataType:"Json",
                success:function(strRet){
                    //回传Json数据
                    var jsonRet = eval("(" + strRet + ")");
                    //成功
                    if(jsonRet.RetFlg=="SUCCESS"){
                        $("#lbEndWork").html(jsonRet.Data);
                        $("#btEndWork").attr("disabled","disabled");
                    }else{
                        var strErrMsg = jsonRet.Data;
                        alert("错误信息：" + strErrMsg);
                    }
                }
            });
        });
        
        //初期状态设定
        //上班时间
        if($("#lbStartWork").html()==""){
            $("#btStartWork").removeAttr("disabled");
        }else{
            $("#btStartWork").attr("disabled","disabled");
        }
        //下班时间
        if($("#lbEndWork").html()==""){
            $("#btEndWork").removeAttr("disabled");
        }else{
            $("#btEndWork").attr("disabled","disabled");
        }
    });

</script>
</head>

<body>
<form method="post" action="" onsubmit="return false;"></form>
<!--header-->
<ucHeader:GlobalHeader ID="GlobalHeader1" runat="server" />
<!--主内容区-->
<div id="container">
<div class="pagesite">您现的位置：<span class="p_org">系统首页</span></div>
<div id="mainbody"><!--mainbody-->
<div class="main_left">
<div class="main_left_part1">
<h2>运营动态</h2>
<ul>
<li class="yeji">本月业绩:售<asp:Label  ID="sale_yeji"  runat="server"/>万 租<asp:Label  ID="hire_yeji"  runat="server"/>万 总计<asp:Label  ID="total_yeji"  runat="server"/>万</li>
<li class="hetong">合同数：售<asp:Label  ID="sale_hetong"  runat="server"/>套 租<asp:Label  ID="hire_hetong"  runat="server"/>套</li>
<li class="bfangyuan">本月房源：售<asp:Label  ID="sale_bfangyuan"  runat="server"/>套 租<asp:Label  ID="hire_bfangyuan"  runat="server"/>套</li>
<li class="gendans">跟单数：<asp:Label  ID="gendans"  runat="server"/>条</li>
<li class="daikan">带看：<asp:Label  ID="daikan"  runat="server"/>套</li>
</ul>
</div>
<div class="main_left_part2">
<div class="padding10">
<a href="HouseManager.aspx" class="part2_i1">房源管理</a>
<a href="AddInfo.aspx" class="part2_i2">房源登记</a>
<a href="HouseTracSearch.aspx?type=0" class="part2_i3">跟单管理</a>
<a href="CustomerManager.aspx" class="part2_i4">客源管理</a>
<a href="AddCustomInfo.aspx" class="part2_i5">客源登记</a>
</div>
</div>
<div style="width:120px;">
    <input type="button" id="btStartWork" class="btn_n fl" value="上班" style="width:50px" />
    <asp:Label runat=server ID="lbStartWork"></asp:Label>
    <input type="button" id="btEndWork" class="btn_n fl" value="下班" style="width:50px" />
    <asp:Label runat=server ID="lbEndWork"></asp:Label>
</div>
<div class="main_left_part3">
<h2>主打楼盘</h2>
</div>
<div class="main_left_part4">
<div class="padding5">
<asp:Repeater id="mainCommunityRepeater" runat="server">
    <ItemTemplate>
        <div class='<%#(Container.ItemIndex%2==0)?"part4_l2":"part4_l1"%>' style="overflow:hidden">
            <div style="float:left;"><%#Eval("CommunityName")%>：售<span  class="login_f_cloor" id="saleState"> <%#Eval("SaleHouse")%> </span>套  租<span id="hireState"  class="login_f_cloor"> <%#Eval("HireHouse")%>  </span> 套 <!-- 当前均价：<span  class="login_f_cloor"><%#Eval("AveragePrice")%></span>  涨跌幅：<span  class="login_f_cloor"><%#Eval("UpDown")%>%</span> --><span id="CommunityName" style="display:none;"><%#Eval("CommunityName")%></span></div> 
            <span class="xiangxi">>> <a href="#">小区详情</a></span>
        </div>
    </ItemTemplate>
</asp:Repeater>
<div style="font: 0px/0px sans-serif;clear: both;display: block"> </div><!--here-->
</div>
</div>
<div class="main_left_part3"><h2>公司业绩</h2></div>
<div class="main_left_part5">
<div class="co_left">
<div><b>09年12月份公司业绩</b></div>
<ul>
<li class="wid80">成交套数</li><li>200套</li>
<li class="wid80">成交涨跌幅</li><li class="rise_up">20.8%</li>
<li class="wid80">总业绩</li><li>2000万</li>
<li class="wid80">业绩涨跌幅</li><li class="rise_up">20%</li>
</ul>
</div>
<div class="co_right"><span><img src="images/pic.png" width="458" height="74" /></span><div style="text-align:center; padding:5px;">柱状图</div></div>
</div>
</div>
<div class="main_right">
<div id="container-1">
            <ul>
                <li><a href="#fragment-1"><span>公告</span></a></li>
                <li><a href="#fragment-2"><span>工作报告</span></a></li>
            </ul>
            <div id="fragment-1">
                 <ol>
                   <asp:Repeater id="RepeaterNotice" runat="server">
                            <ItemTemplate>
                                    <li>
                                        <a href="#" class="channel" title='<%#Eval("Title")%>'><%#Eval("Title")%></a>
                                        <span class="date"><%#Eval("SendDate")%></span>
                                    </li>
                             </ItemTemplate>
                         </asp:Repeater>
                  </ol>
              <div class="main_right_more"><a href="#" class="channel"> >>更多</a></div>
            </div>
            <div id="fragment-2">
                <ol>
                    <asp:Repeater id="RepeaterReport" runat="server">
                        <ItemTemplate>
                                <li>
                                    <a href="#" class="channel" title='<%#Eval("Title")%>'><%#Eval("Title")%></a>
                                    <span class="date"><%#Eval("CreateDate")%></span>
                                </li>
                         </ItemTemplate>
                     </asp:Repeater>
              </ol>
               <div class="main_right_more"><a href="#" class="channel"> >>更多</a></div>
            </div>
        </div>
        <div id="container-2">
            <ul>
                <li><a href="#fragment-4"><span>客源收藏</span></a></li>
                <li><a href="#fragment-5"><span>房源收藏</span></a></li>
            </ul>
            <div id="fragment-4">
                <ol>
                    <asp:Repeater id="RepeaterHouse" runat="server">
                        <ItemTemplate>
                                <li>
                                    <a href="#" class="channel" title='<%#Eval("FavorName")%>'><%#Eval("FavorName")%></a>
                                    <span class="date"><%#Eval("AddTime")%></span>
                                </li>
                         </ItemTemplate>
                     </asp:Repeater>
                </ol>
                <div class="main_right_more"><a href="#" class="channel"> >>更多</a></div>
            </div>
            <div id="fragment-5">
                <ol>
                     <asp:Repeater id="RepeaterCustomer" runat="server">
                        <ItemTemplate>
                                <li>
                                    <a href="#" class="channel" title='<%#Eval("FavorName")%>'><%#Eval("FavorName")%></a>
                                    <span class="date"><%#Eval("AddTime")%></span>
                                </li>
                         </ItemTemplate>
                     </asp:Repeater>
              </ol>
               <div class="main_right_more"><a href="HouseManager.aspx?flg=0" class="channel"> >>更多</a></div>
            </div>
        </div>
        <div class=" main_right_tit"><h2>跟单提醒</h2></div>
        <div class="ui-tabs-panel">
         <ol>
            <asp:Repeater id="RepeaterFollowClew" runat="server">
                <ItemTemplate>
                        <li>
                            <a href="#" class="channel" title='<%#Eval("body")%>'><%#Eval("body")%></a>
                            <span class="date"><%#Eval("AddTime")%></span>
                        </li>
                 </ItemTemplate>
             </asp:Repeater>
             </ol><div class="main_right_more"><a href="#" class="channel"> >>更多</a></div>
        </div>
        <div class=" main_right_tit"><h2>知识库</h2></div>
        <div class="ui-tabs-panel">
         <ol>
                    <li><a href="#" class="channel" title="新工作报告最新的工作报告于时间亲的地晃荡">新工作报告最新的工作报告于时间亲的地晃荡</a>
                        <span class="date">2010-02-24</span></li>
                    <li><a href="#" class="channel" title="新工作报告最新的">新工作报告最新的</a>
                        <span class="date">2010-02-24</span></li>
                    <li><a href="#" class="channel" title="新工作报告最新的工作报告于时间亲的地晃荡">新工作报告最新的工作报告于时间亲的地晃荡</a>
                        <span class="date">2010-02-24</span></li>
                    <li><a href="#" class="channel" title="新工作报告最新的">新工作报告最新的</a>
                        <span class="date">2010-02-24</span></li>
              </ol><div class="main_right_more"><a href="#" class="channel"> >>更多</a></div>
        </div>

</div>
</div><!--mainbody div结束-->
<div class="clear"></div>
</div>
<!--Footer-->
<ucFooter:GlobalFooter ID="GlobalFooter1" runat="server" />

</body>
</html>
